import React from 'react';
import {
  BrowserRouter as Router,
  Route,
  Redirect
} from 'react-router-dom';

// 引入组件
import Index from './pages/index'
import CityList from './pages/cityList'
import Map from './pages/map'

function App() {
  return (
    <Router>
      <div className="app">
        <Route exact path="/" render={() => <Redirect to="/home" />} />
        <Route path='/home' component={Index} />
        <Route path="/city-list" component={CityList} />
        <Route path="/map" component={Map} />
      </div>
    </Router>
  );
}

export default App;
